package com.example.cardgame


import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.widget.Button
import android.widget.Toast
//import com.example.ktscaffold.R

class CommonDialog(context: Context): Dialog(context) {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.commondialog)
        val btn: Button = findViewById(R.id.btn)
        //dialog中的点击事件
        btn.setOnClickListener() {
//            Toast.makeText(context, "点击了", Toast.LENGTH_LONG).show()
            //点击后关闭dialog
            dismiss()
        }
    }
}
    